﻿using System;
using System.Data;

using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace CAATS_Registration
{
    public partial class caats_step4 : System.Web.UI.Page
    {

        protected string str;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                //this.txtDateCheckIn.Attributes.Add("onClick ", this.Button_DateCheckIn.ClientID + ".click() ");
                //this.txtDateDeparture.Attributes.Add("onClick ", this.Button_DateDeparture.ClientID + ".click() "); 
                //iframeleft.Visible = false;
                //MemberInfo2.Visible = false;
                //for
            }
        }


        protected void Back_Click(object sender, EventArgs e)
        {
            Server.Transfer("caats_step3.aspx?name=step3", true);
        }
        protected bool need_remind()
        {
            if (txtDateCheckIn.Text.Equals(""))
                return true;
            if (txtDateDeparture.Text.Equals(""))
                return true;
            if (GardenViewRoom.Text.Equals(""))
                return true;
            if (OceanViewRoom.Text.Equals(""))
                return true;
            if (GrandOceanViewRoom.Text.Equals(""))
                return true;
            if (TextBox_GVRSCNT.Text.Equals(""))
                return true;
            if (TextBox_OVRSCNT.Text.Equals(""))
                return true;
            if (TextBox_GOVRSCNT.Text.Equals(""))
                return true;
            return false;
        }
        protected void Next_Click(object sender, EventArgs e)
        {
            /// next
            /// 
            if (need_remind() )
            {
                Response.Write(" <script laguage= 'javascript'> alert( 'Please complete the information with a red asterisk (*) '); </script> ");
                return;
            }
            save_data();

            Server.Transfer("caats_step5.aspx?name=step3", true);

        }

        protected void GoldenViewRoom_TextChanged(object sender, EventArgs e)
        {
          

        }

        protected void OceanViewRoom_TextChanged(object sender, EventArgs e)
        {
            

        }

        protected void GrandOceanViewRoom_TextChanged(object sender, EventArgs e)
        {
            
        }


        protected void save_data()
        {

            dataRecord.Instance()._strGVRCnt = GardenViewRoom.Text;
            dataRecord.Instance()._strOVRCnt = OceanViewRoom.Text;
            dataRecord.Instance()._strGOVRCnt = GrandOceanViewRoom.Text;
            dataRecord.Instance()._strDateCheckIn = txtDateCheckIn.Text;
            dataRecord.Instance()._strDateDeparture = txtDateDeparture.Text;
            dataRecord.Instance()._strGVRSmokingCnt = TextBox_GVRSCNT.Text;
            dataRecord.Instance()._strOVRSmokingCnt = TextBox_OVRSCNT.Text;
            dataRecord.Instance()._strGOVRSmokingCnt = TextBox_GOVRSCNT.Text;


        }

        protected void txtDateCheckIn_TextChanged(object sender, EventArgs e)
        {

        }
    }
}
